<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
	<title><?php echo $title; ?></title>
	<?php if ($keywords) { ?>
		<meta name="keywords" content="<?php echo $keywords; ?>" />
	<?php } ?>
	<?php if ($description) { ?>
		<meta name="description" content="<?php echo $description; ?>" />
	<?php } ?>
	<base href="<?php echo $base; ?>" />
	<?php if ($icon) { ?>
		<link href="<?php echo $icon; ?>" rel="icon" />
	<?php } ?>
	<?php foreach ($links as $link) { ?>
		<link href="<?php echo str_replace('&', '&amp;', $link['href']); ?>" rel="<?php echo $link['rel']; ?>" />
	<?php } ?>
	
	<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $template; ?>/css/style.css" />
	
	<script type="text/javascript" src="catalog/view/theme/<?php echo $template; ?>/js/jquery.js"></script>
	<script type="text/javascript" src="catalog/view/theme/<?php echo $template; ?>/js/list_images.js"></script>  	
</head>
<body>
<div id="page_margins">
	<div id="page">
		<!-- Header and content -->
    	<div id="page_content">
    		<!-- Header -->
        	<div id="header">
	            <p class="float_left p20t"><a href="<?php echo $home; ?>"><img src="catalog/view/theme/<?php echo $template; ?>/images/logo.png"/></a></p>
	            <p class="box_shopping float_right">
		            <span class="text_shopping"><a href="<?php echo $viewcart; ?>">Indkøbskurven</a></span><br />
		            Du har : 0  |  Total :  DKK 3495,- 
	            </p>
	            <p class="cb"></p>
            </div>
            
            <!-- Menu -->
            <div>
            	<div id="nav_main">
	                <ul>
                		<li id="MenuHome"><a href="<?php echo $home; ?>">Forside</a></li>
		                <li id="MenuOmos"><a href="<?php echo $omos; ?>">Om Havhøkeren</a></li>
		                <li id="MenuProduct"><a href="<?php echo $product; ?>">Produkter </a></li>
		                <li id="MenuBlog"><a href="<?php echo $blog; ?>" target="_blank">Blog</a></li>
		                <li id="MenuHandel"><a href="<?php echo $handels; ?>" target="_blank">Handelsbetingelser</a></li>
	                  	<li id="MenuContact" style="background:none"><a href="<?php echo $contact; ?>">Kontakt os</a></li>
	                </ul>
                </div>
              	<div class="box_search float_right">
                	<input class="search_txt" name="" value="Søg efter id eller produktnavn" /><input name="" type="image" src="catalog/view/theme/<?php echo $template; ?>/images/icon_search.png" />
              	</div>
                <p class="cb"></p>
            </div>
			
			<!-- End header -->            
            
<script type="text/javascript"><!-- 
	// Carousel 
	jQuery(document).ready(function(){
		if(jQuery("#mycarousel").length > 0){
			jQuery("#mycarousel").jCarouselLite({
				btnNext: ".next",
				btnPrev: ".prev",
				visible : 4,
				scroll: 1,
				speed : 400
			});	
		};
		
		// Set active menu
		route = getURLVar('route'); 	
		if (!route) {
			jQuery('#MenuHome').addClass('current');
		} 
		else {
			part = route.split('/');
			
			if (route == 'common/home'){
				jQuery('#MenuHome').addClass('current');
			} 
			else if (part[0] == 'product') {
				jQuery('#MenuProduct').addClass('current');	
			} 
			else if (route == 'information/information') {
				alias = getURLVar('alias'); 
				if (alias == 'handelsbetingelser'){  
					jQuery('#MenuHandel').addClass('current');
				}
				else if (alias == 'omos'){
					jQuery('#MenuOmos').addClass('current');	
				}
			} 
			else if ((part[0] == 'information') && (part[1] == 'contact')) {
				jQuery('#MenuContact').addClass('current');	
			} 
			else{
				jQuery('#MenuProduct').addClass('current');
			} 
		}
	});
	
	function getURLVar(urlVarName) {
		var urlHalves = String(document.location).toLowerCase().split('?');
		var urlVarValue = '';
		
		if (urlHalves[1]) {
			var urlVars = urlHalves[1].split('&');

			for (var i = 0; i <= (urlVars.length); i++) {
				if (urlVars[i]) {
					var urlVarPair = urlVars[i].split('=');
					
					if (urlVarPair[0] && urlVarPair[0] == urlVarName.toLowerCase()) {
						urlVarValue = urlVarPair[1];
					}
				}
			}
		}
		
		return urlVarValue;
	}            
//--></script>   

<script type="text/javascript"><!-- 	
	//Search
	jQuery('#search input').keydown(function(e) {
		if (e.keyCode == 13) {
			moduleSearch();
		}
	});

	function moduleSearch() {
		url = 'index.php?route=product/search';
		
		var filter_keyword = $('#filter_keyword').attr('value')
		
		if (filter_keyword) {
			url += '&keyword=' + encodeURIComponent(filter_keyword);
		}
		
		var filter_category_id = $('#filter_category_id').attr('value');
		
		if (filter_category_id) {
			url += '&category_id=' + filter_category_id;
		}
		
		location = url;
	}
//--></script>
